﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FoneBuddy.LinqModel.Data;

namespace FoneBuddy.LinqModel
{
  public partial  class Category
    {
      
        #region Variable Declaration
        private IDataRepository _dataObject;
        #endregion

        public Category(IDataRepository dataObject)
            : this()
        {
            _dataObject = dataObject;
        }
        public List<Category> GetAllCategory()
        {
            return _dataObject.GetAllCategory();
        }
        public void Create()
        {
            _dataObject.CreateCategory(this);
        }
        public void Delete()
        {
            _dataObject.DeleteCategory(this);
        }
        public void Update()
        {
            _dataObject.UpdateCategory(this);
        }
        public void GetCategoryById()
        {
            _dataObject.GetCategoryById(this);
        }
        public void GetCategoryByName()
        {
            _dataObject.GetCategoryByName(this);
        }
    }
}
